package gewu.suleju.dao.iml;

import gewu.suleju.model.pojo.HouseInfor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IHouseDetailDao extends JpaRepository<HouseInfor,Integer> {
    HouseInfor findHouseInforById(int id);
    @Query(value = "select * from house_infor where id!=?1",nativeQuery = true)
    List<HouseInfor> findALLhouse(Integer id);
    @Query(value = "select * from house_infor where id=?1",nativeQuery = true)
    HouseInfor findBrokerId(int id);

    HouseInfor findById(int id);
    @Query(value="select house_pic_address from house_pic where house_infor_id=?1  limit 0,1 ",nativeQuery = true)
    String  findOneHousePic(Integer houseid);



}
